import request from '@/utils/request'


export default{
    addCourseInfo(courseInfo){
        return request({
            url: '/eduservice/course/saveCourse',
            method: 'post',
            data: courseInfo
          })
    },
    getListTeacher(){
        return request({
            url: '/eduservice/edu-teacher/findAll',
            method: 'get'
        })
    },
    getCourseInfo(courseId){
        return request({
            url: '/eduservice/course/getCourseInfo/'+courseId,
            method: 'get'
        })
    },
    updateCourseInfo(courseInfo){
        return request({
            url: '/eduservice/course/updateCourseInfo',
            method: 'post',
            data: courseInfo
        })
    },
    getcoursePublishVoInfo(courseId){
        return request({
            url: '/eduservice/course/selectCoursePublish/'+courseId,
            method: 'get'
        })
    },
    publishCourse(courseId){
        return request({
            url: '/eduservice/course/publishCourse/'+courseId,
            method: 'post'
        })
    },
    getPageCourseList(current,limit,courseQuery){
        return request({
            url: `/eduservice/course/pageQueryForCondition/${current}/${limit}`,
            method: 'post',
            data: courseQuery
        })
    },
    removeCourseById(courseId){
        return request({
            url: '/eduservice/course/deleteCourse/'+courseId,
            method: 'delete'
          })
    },
}